import request from '_utils/request'
// 商品分类列表
const getCateLists = (params = {}) => request.get('/cateLists', { params })
// 增加商品分类 /itemAadd
const addCate = (params = {}) => request.post('/cateAdd', params)
// 获取分类详情
const getCateDetail = (params = {}) => request.get('/getCateDetail', { params })
// 修改分类
const updateCate = (params = {}) => request.put('/updateCate', params)
// 商品列表 /itemLists
const getItemLists = (params = {}) => request.get('/itemLists', { params })
// 新增商品接口
const addItem = (params = {}) => request.post('/itemAdd', params)
// 获取商品详情 /getItemDetail
const getItemDetail = (params = {}) => request.get('/getItemDetail', { params })
// 修改商品
const updateItem = (params = {}) => request.put('/updateItem', params)
// 删除商品 /delItem
const delItem = (id) => request.delete('/delItem', { params: { id } })
// 用户登录接口
const doLogin = (params = {}) => request.post('/login', params)
export {
  getCateLists,
  addCate,
  getCateDetail,
  updateCate,
  getItemLists,
  addItem,
  getItemDetail,
  updateItem,
  delItem,
  doLogin
}
